<template>
  <div style="background-color: aqua; padding: 10px 0">
    <h1>女儿小红：有存款：{{ money }}</h1>
    <button @click="givemoney(150)">给爸爸钱：150</button>
  </div>
</template>

<script>
import methodsMixin from "./mymixin/methodsMixin";

export default {
  mixins: [methodsMixin],
  data() {
    return {
      money: 4000,
    };
  },
  // methods: {
  //   givemoney(money) {
  //     console.log(this.$parent.money);
  //     this.money -= money;
  //     this.$parent.money += money;
  //   },
  // },
};
</script>
